package com.guigu.qingcheng.servicebusiness.service.impl;

import com.guigu.qingcheng.servicebusiness.service.TbAdService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Init implements InitializingBean {

    @Autowired
    private TbAdService tbAdService;

    public void afterPropertiesSet() throws Exception {
        System.out.println("‐‐‐缓存预热‐‐‐");
        tbAdService.saveAllAdToRedis();
    }

}
